@import '../../../theme/style/variables.module.less';

.container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.items {
    position: relative;
}

.item {
    .flex(flex-start, flex-start, column);
    position: relative;

    &-card {
        background: var(--mi-items-list-background);
        .properties(padding, 16);
        .radius(8);

        & + & {
            .properties(margin-top, 16);
        }
    }

    &-inner {
        .flex(flex-start, flex-start);
        position: relative;

        @media only screen and (max-width: @mi-sm) {
            flex-direction: column;

            > a {
                flex-direction: column;
            }
        }

        &-reverse {
            flex-direction: row-reverse;

            @media only screen and (max-width: @mi-sm) {
                flex-direction: column-reverse;
            }

            > a {
                flex-direction: row-reverse;

                @media only screen and (max-width: @mi-sm) {
                    flex-direction: column-reverse;
                }

                > .btn {
                    display: none;
                    visibility: hidden;
                    opacity: 0;
                }
            }
        }
    }
}

.thumb {
    &-inner {
        position: relative;
        margin: 0 auto;
        max-width: 100%;

        .btn {
            right: unset;
            left: -2.25rem;
        }
    }

    position: relative;
    overflow: hidden;
    max-width: 100%;
    .properties(min-height, 200);
    .properties(max-height, 960);
    .transition();

    @media only screen and (max-width: @mi-md) {
        .properties(min-height, 180);
    }

    @media only screen and (max-width: @mi-sm) {
        min-height: unset;
        .properties(margin-bottom);
    }

    img {
        max-width: 100%;
        .transition();
    }

    &-date {
        color: var(--mi-items-list-date);
        display: none;

        @media only screen and (max-width: @mi-sm) {
            .flex(center, space-between);
        }
    }
}

.item-inner:hover .thumb-scale img {
    transform: scale(1.2);
}

.item-inner-reverse .info-date,
.item-inner-reverse .thumb-inner .date {
    display: none;
}

.start {
    .flex(flex-start, flex-start);
}

.center {
    .flex();
}

.end {
    .flex(flex-end, flex-end);
}

.info {
    position: relative;
    z-index: 10;

    &-title,
    &-intro {
        color: var(--mi-items-list-text);
        .lines();
        .transition();
    }

    &-title {
        .properties(margin-bottom);
    }

    &-date {
        display: none;
        color: var(--mi-items-list-date);

        @media only screen and (max-width: @mi-sm) {
            .flex(center, space-between);
            .properties(margin-top);
        }
    }
}

.item-inner-reverse .info-intro {
    @media only screen and (max-width: @mi-sm) {
        .properties(margin-bottom);
    }
}

.date {
    position: absolute;
    bottom: 0;
    left: 100%;
    color: var(--mi-items-list-date);
    white-space: nowrap;
    z-index: 20;

    span + span {
        .properties(margin-left);
    }

    @media only screen and (max-width: @mi-sm) {
        display: none;
    }
}

.item-inner-reverse .date {
    left: 0;
}

.line {
    width: 100%;
    background: var(--mi-items-list-line-default);
    position: relative;

    &:after {
        position: absolute;
        left: 0;
        .properties(height, -1);
        width: 0;
        .properties(height, 2);
        background: var(--mi-items-list-line-hover);
        content: '';
        display: block;
        z-index: 10;
        .transition();

        @media only screen and (max-width: @mi-sm) {
            display: none;
        }
    }

    &-hover:after {
        width: 100%;
    }

    &-transparent {
        background: transparent !important;
    }

    &-transparent.line-hover:after {
        width: 0;
    }
}

.btn {
    position: absolute;
    right: 0;
    bottom: 0;
    .transition();

    @media only screen and (max-width: @mi-sm) {
        display: none;
    }
}

:export {
    --items-list-background: var(--mi-on-background);
    --items-list-text: var(--mi-background);
    --items-list-date: rgba(var(--mi-rgb-background), 0.5);
    --items-list-line-default: rgba(var(--mi-rgb-background), 0.1);
    --items-list-line-hover: var(--mi-error-container);
}